#include once "actor.bi"
using ext

constructor actor()
	stren = 50
	load = 0
	inventory = new fbext_Array( ((object)) )
end constructor

constructor actor ( byref rhs as const actor )

	this = rhs

end constructor

operator actor.Let ( byref rhs as const actor )

	var rhsp = cast( integer ptr, @rhs )
	var rhs2 = *cast( actor ptr, rhsp )
	
	name = rhs.name
	rhs2.name = ""
	stren = rhs.stren
	load = rhs.load
	inventory = rhs.inventory
	rhs2.inventory = null
	
	pixmap = rhs.pixmap
	rhs2.pixmap = null
	
end operator

constructor actor( byref _name as string, byval _stren as ubyte = 50 )

	name = _name
	stren = _stren
	load = 0
	inventory = new fbext_Array( ((object)) )
	
end constructor

destructor actor()

	name = ""
	
	if pixmap <> null then delete pixmap
	if inventory <> null then delete inventory

end destructor

#define actor_define fbext_TDefine(public, fbext_Array, ((actor)) )
actor_define